import 'package:base_lib/utils/color_util.dart';
import 'package:flutter/material.dart';

Widget textAreaWidget(
    {String placeholder = "请输入...",
    ValueChanged<String> onChanged,
    String defaultValue}) {
  return TextField(
      controller: TextEditingController(text: defaultValue),
      decoration: InputDecoration(
          border: InputBorder.none,
          hintText: placeholder,
          filled: true,
          fillColor: ColorUtil.color("#F5F5F5")),
      maxLength: 200,
      maxLines: 3,
      onChanged: onChanged,
      strutStyle: StrutStyle(fontSize: 15, height: 1),
      style: TextStyle(color: Colors.black, fontSize: 15));
}

Widget fieldInputWidget(String placeholder) {
  return TextField(
      decoration:
          InputDecoration(border: InputBorder.none, hintText: placeholder),
      onChanged: (value) {},
      textAlign: TextAlign.right,
      strutStyle: StrutStyle(fontSize: 15, height: 1),
      style: TextStyle(color: Colors.black, fontSize: 15));
}
